<template>
  <div class="child">
    <h1>Child1</h1>
    <h2>money:{{ modelValue }}</h2>
    <button @click="hander">父子组件数据同步</button>
  </div>
</template>
<script setup>
let props = defineProps(["modelValue"]);
let $emit = defineEmits(["update:modelValue"]);

const hander = () => {
    // console.log(props.modelValue );
    $emit("update:modelValue", props.modelValue + 1000);
};
</script>
<style scoped>
.child {
  width: 500px;
  height: 200px;
  background-color: hotpink;
}
</style>
